import { req_register_Phonecode, req_Go_register } from '../../api/req_fun'
import { Message } from 'element-ui'
export default {
    namespaced: true,
    state: () => ({
        
    }),
    actions: {
        // 获取短信验证码
        async get_Register_Phonecode({commit}, phone) {
            const data = await req_register_Phonecode(phone)
            if (data.code === 200) {
                return data
            } else {
                return Promise.reject(new Error('fail'))
            }
        },
        // 请求注册
        async get_Go_register({ commit }, req_fromData) {
            const data = await req_Go_register(req_fromData)
            if (data.code === 200) {
                return 'ok'
            } else {
                return Promise.reject(new Error('fail'))
            }
        }
    },
    mutations: {
    },
    getters: {
    }
}